﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AppiSynchro.Library.Helpers
{
    public class RepositoryHelper
    {
        public String GenerateSetupUri(String url, String gui, String version, String language, String setupExe)
        {
            return url + "/Applications/" + gui + "/" + version + "/" + language + "/" + setupExe;
        }

        public static bool GetCache(String user, String pass, String url, String localPath)
        {
            String cacheUrl = url + "/Cache";
            return WebDavHelper.GetDirectoryFiles(user, pass, cacheUrl, localPath, "xml");
        }

        public static bool GetApplicationInfo(String user, String pass, String url, String localPath)
        {
            String AIUrl = url + "/AILib";
            return WebDavHelper.GetDirectoryFiles(user, pass, AIUrl, localPath, "dll");
        }

        public static bool GetInstallationPipeline(String user, String pass, String url, String localPath)
        {
            String AIUrl = url + "/PLLib";
            return WebDavHelper.GetDirectoryFiles(user, pass, AIUrl, localPath, "dll");
        }
    }
}
